<?php
/*==============薛宁============*/
Route::post('/admin/link/changeorder', 'Admin\LinkController@changeorder');

//网站维护跳转路由
Route::get('/close','Home\CloseController@index');










/*==============51-100 何欢============*/
// 前台路由
Route::get('/','Home\IndexController@index');

//前台用户中心
Route::resource('/user','Home\UserController');

//修改个人信息手机验证路由
Route::get('/phone','Home\UserController@getverifycode');
Route::get('/phoneCode','Home\UserController@phoneCode');
//修改个人信息检测用户名路由
Route::get('/testusername','Home\UserController@username');
//修改个人信息检测邮箱名路由
Route::get('/testemail','Home\UserController@email');
//签到路由
Route::get('/qiandao','Home\UserController@qiandao');
Route::get('/jifen','Home\UserController@jifen');
//我的购买
Route::get('/mybuy','Home\UserController@mybuy');
Route::get('/shipment','Home\UserController@shipment');
//确认收货
Route::get('/affirm','Home\UserController@affirm');
//删除订单
Route::get('/myorderdel','Home\UserController@myorderdel');

//发货
Route::post('/shipment','Home\UserController@doshipment');
//卖家查看订单
Route::get('/showorder','Home\UserController@showorder');






//商品发布路由
Route::get('/publish','Home\PublishController@publish');
Route::post('/publish','Home\PublishController@doPublish');
Route::get('/publish/pid','Home\PublishController@sid');
Route::post('/publish/upload','Home\PublishController@upload');
Route::get('/publish/edit','Home\PublishController@edit');
Route::post('/publish/edit','Home\PublishController@doEdit');
Route::get('/publish/del','Home\PublishController@del');






//后台登录路由
Route::get('/admin/login','Admin\LoginController@index');
Route::post('/admin/login','Admin\LoginController@do_login');

// 退出登录
Route::get('/admin/logout','Admin\LoginController@logout');


//验证码路由
Route::get('code/{tmp}','Admin\LoginController@code' );

//后台路由组
Route::group(['middleware'=>['login','permission']],function(){

	//后台主页
	Route::get('/admin/index',function(){
		return view('admin.index.index');
	});

	//后台用户路由
	Route::resource('/admin/user','Admin\UserController');
	Route::get('/admin/ver','Admin\UserController@verification');

	//前台用户路由
	Route::resource('/admin/homeuser','Admin\HomeUserController');

	//角色路由
	Route::resource('/admin/role','Admin\RoleController');
	Route::post('/admin/role/auth','Admin\RoleController@auth');

	//权限路由
	Route::resource('/admin/per','Admin\PermissionController');
	Route::post('/admin/per/create','Admin\PermissionController@create');



	/*==============101-150 杨志金============*/
	// 后台 广告位管理->轮播图管理
	Route::resource('/admin/slide','Admin\SlideController');
	Route::post('/admin/slide/changeorder','Admin\SlideController@changeOrder');

	// 后台 广告位管理->轮播图管理 文件上传
	Route::post('/admin/upload','Admin\SlideController@Upload');
	// 后台 广告位管理->广告管理
	Route::resource('/admin/ad','Admin\AdController');
	Route::post('/admin/ad/changeorder','Admin\AdController@changeOrder');

	// // 后台 广告位管理->轮播图管理 文件上传
	Route::post('/admin/ad_upload','Admin\AdController@Upload');




	/*==============151-200 马志达============*/
	//商品列表路由
	Route::resource('/admin/goods','Admin\GoodsController');
	//更改商品状态路由
	Route::get('admin/goods/changeStatus/{id}','Admin\GoodsController@changeStatus');
	//鱼塘列表路由
	Route::resource('/admin/fishpond','Admin\FishPondController');
	//鱼塘回答列表路由
	Route::get('/admin/fishpond/answer/{id}','Admin\FishPondController@answer');
	//鱼塘回复列表路由
	Route::get('/admin/fishpond/reanswer/{id}','Admin\FishPondController@reAnswer');
	//鱼塘执行回复逻辑路由
	Route::post('/admin/fishpond/do_reAnswer','Admin\FishPondController@do_reAnswer');
	//鱼塘执行删除回复逻辑路由
	Route::get('/admin/fishpond/delAnswer/{id}','Admin\FishPondController@delAnswer');
	//鱼塘执行删除问题逻辑路由
	Route::post('/admin/fishpond/delQuestion/{id}','Admin\FishPondController@delQuestion');
	//后台网站配置管理路由
	Route::resource('/admin/config','Admin\ConfigController');
	Route::post('/admin/config/upload','Admin\ConfigController@upload');



	/*==============201- 于明============*/
	//分类路由
	Route::controller('/cate','Admin\CateController');

	//订单详情路由
	Route::resource('/order','Admin\OrderController');



	/*==============2-50 薛宁============*/

	// Route::post('/admin/link','Admin\LinkController@changeOrder');
	Route::resource('/admin/link', 'Admin\LinkController');


});


































	/*==============101-150 杨志金============*/


//前台用户中心 意见反馈页
Route::get('/idea','Home\UserController@idea');
//前台用户中心 意见反馈信息处理页
Route::post('/doidea','Home\UserController@doidea');
//后台 (网站管理)用户意见反馈页

Route::resource('/admin/idea','Admin\IdeaController');
//后台 (网站管理)用户意见反馈页 删除路由
Route::post('/admin/idea/delQuestion/{id}','Admin\IdeaController@delQuestion');

 

 //商品回复路由
Route::post('/goods/reply','Home\GoodsListController@reply');

















































	/*==============201- 马志达============*/


//木鱼前台注册页面路由
Route::get('/register','Home\RegisterController@index');


//前台验证码路由
Route::get('/register/code/{tmp}','Home\RegisterController@code');
//ajax发送验证码到后台路由
Route::get('/register/getverifycode','Home\RegisterController@getVerifyCode');
//ajax发送数据到后台并保存到数据库
Route::get('/register/doregister','Home\RegisterController@doRegister');
//前台登录页面路由
Route::get('/login','Home\LoginController@index');
//前台执行登录路由
Route::post('/login/dologin','Home\LoginController@doLogin');
//前台忘记密码主页路由
Route::get('/forget','Home\ForgetController@index');
//前台修改密码验证码路由
Route::get('/forget/getverifycode','Home\ForgetController@getVerifyCode');
//前台执行修改密码逻辑路由
Route::post('/forget/doforget','Home\ForgetController@doForget');
//前台退出
Route::get('/logout','Home\LoginController@doLogout');
//前台商品列表路由
Route::get('/goods/{id}','Home\GoodsListController@index');
//商品列表购买检查是否登录路由
Route::get('/login/checklogin','Home\LoginController@checkLogin');
//商品确认订单列表路由
Route::get('/goods/buy/{id}','Home\GoodsListController@buy');
//商品支付页面
Route::any('/good/pay','Home\GoodsListController@pay');
//商品支付成功页面

Route::get('/good/info/{id}','Home\GoodsListController@info');
Route::get('/good/payaa/{code}','Home\GoodsListController@payaa');



















































	/*==============201- 于明============*/


//前台分类路由
Route::resource('/','Home\IndexController');

//前台分类详情页路由
Route::controller('/typedetails','Home\TypedetailsController');

//点击收藏的路由
Route::resource('/click','Home\ClickController');

//主页搜索路由
Route::controller('/search','Home\SearchController');


//个人中心的我的点赞的路由
Route::controller('/myclick','Home\MyclickController');



//搜索详情页的收藏路由
Route::resource('/searchclick','Home\SearchclickController');

//导航加分类的路由
Route::resource('/headnav','Home\HeadnavController');